define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
		
		//返回信息
		return {
			//欠款详情。type 默认0：供应商，1：好友店铺
			agent_credit: function(store_id,type,callback) {	
				Http.post({
					method: 'member.supplier.credit.detail',
					store_id: store_id,
					type:type,
				}, function(result) {
					if(callback)
						callback(result);
				}, function(e) {

				}, function() {

				})
			}

		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Credit_repayment", factory);
});